<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <meta content="HTML Tidy for Cygwin (vers 1st February 2003), see www.w3.org" name="generator">
    <meta name="keywords" content="electronic commerce, ecommerce, ebusiness, e-business, e-commerce, enterprise software, net economy, Netscape, Sun Microsystems, DevEdge Archive, iPlanet, internet software">
    <meta name="description" content="The DevEdge Archive, a strategic alliance formed by America Online and Sun Microsystems, Inc., is delivering iPlanet e-commerce software and enterprise solutions that enable companies to compete successfully in the Net Economy">
    <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
    <meta name="TEMPLATEBASE" content="Authored in FrameMaker. Converted to HTML in WebWorks Publisher 2000. manual wdt 1.5">
    <meta name="LASTUPDATED" content="09/28/00 13:16:20">
    <title>
      Core JavaScript Reference 1.5: 4 Comments
    </title>
    <link rel="stylesheet" type="text/css" href="js15ref.css">
  </head>
  <body>
    <table width="100%" border="0" cellspacing="4">
      <tr>
        <td valign="top">
          <b><a class="sansserifPurple" href="stmt.html">Previous</a></b>&nbsp;&nbsp;&nbsp;&nbsp; <a href="contents.html"><b class="sansserifPurple">Contents</b></a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="ix.html"><b class="sansserifPurple">Index</b></a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="ops.html"><b class="sansserifPurple">Next</b></a> &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
      </tr>
      <tr>
        <td class="sansserifBlack" valign="top" align="right" bgcolor="#CCCCCC">
          <b>Core JavaScript Reference 1.5</b>
        </td>
      </tr>
    </table><br>
     
    <blockquote>
      <br>
      <br>
       <a name="1066580" id="1066580"></a> <a name="" id=""></a><span class="sansserif666"><b>Chapter 4 
       &nbsp;</b></span> <a name="1066582" id="1066582"></a> <a name="Comments" id="Comments"></a> <span class="sansserifBlack"><b>Chapter 4 Comments 
      </b></span><br>
      <br>
      <br>
       <a name="1066594" id="1066594"></a> <span class="sansserif">This chapter describes the syntax for comments, which can appear anywhere between tokens.</span> 
      <p>
        <br>
        <br>
         <a name="1066617" id="1066617"></a> <a name="comment" id="comment"></a> <span class="sansserif">comment
        </span>
      </p>
      <hr size="2" noshade="noshade">
      <br>
       <a name="1066618" id="1066618"></a> <span class="sansserif">Notations by the author to explain what a script does. Comments are ignored by the interpreter.<br></span><br>
       
      <table width="90%" border="1" cellpadding="5" cellspacing="0">
        <tr>
          <td valign="top">
            <p>
              <a name="1066621" id="1066621"></a> <span class="sansserif"><i>Implemented in</i></span> &nbsp;
            </p>
          </td>
          <td valign="top">
            <p>
              <a name="1066623" id="1066623"></a> <span class="sansserif">JavaScript 1.0, NES 2.0</span> &nbsp;
            </p>
          </td>
        </tr>
        <tr>
          <td valign="top">
            <p>
              <a name="1066625" id="1066625"></a> <span class="sansserif"><i>ECMA version</i></span> &nbsp;
            </p>
          </td>
          <td valign="top">
            <p>
              <a name="1066627" id="1066627"></a> <span class="sansserif">ECMA-262</span> &nbsp;
            </p>
          </td>
        </tr>
      </table>
      <p>
        <br>
         <a name="1066628" id="1066628"></a> <a name="Syntax" id="Syntax"></a> <span class="sansserif"><b>Syntax</b></span><br>
         <a name="1066629" id="1066629"></a><span class="mono">// comment text<br>
         /* multiple line comment text */</span>
      </p>
      <p>
        <br>
         <a name="1066630" id="1066630"></a> <a name="Description" id="Description"></a> <span class="sansserif"><b>Description</b></span><br>
         <a name="1066631" id="1066631"></a> <span class="sansserif">JavaScript supports Java-style comments:</span>
      </p>
      <ul>
        <li class="nobullet">
          <a name="1066632" id="1066632"></a>
        </li>
        <li>
          <span class="sansserif">Comments on a single line are preceded by a double-slash (//).</span> 
          <p>
            <a name="1066633" id="1066633"></a>
          </p>
        </li>
        <li>
          Comments that span multiple lines are preceded by a /* and followed by a */.
        </li>
      </ul><br>
       <a name="1066634" id="1066634"></a> <a name="Examples" id="Examples"></a> <span class="sansserif"><b>Examples</b></span><br>
       <a name="1066635" id="1066635"></a><span class="mono">// This is a single-line comment.<br>
       /* This is a multiple-line comment. It can be of any length, and<br>
       you can put whatever you want here. */</span> 
      <dl>
        <dt>
          <a name="1066373" id="1066373"></a> <span class="sansserif">
           
          </span><br>
        </dt>
      </dl>
    </blockquote>
    <blockquote>
      <br>
       <b><a class="sansserifPurple" href="stmt.html">Previous</a></b>&nbsp;&nbsp;&nbsp;&nbsp; <a href="contents.html"><b class="sansserifPurple">Contents</b></a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="ix.html"><b class="sansserifPurple">Index</b></a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="ops.html"><b class="sansserifPurple">Next</b></a> &nbsp;&nbsp;&nbsp;&nbsp; 
      <hr noshade="noshade" size="1">
      <span class="sansserif">Copyright &copy; 2000 <a href="http://www.netscape.com">Netscape Communications Corp.</a> All rights reserved.</span>
    </blockquote>
    <p class="alignright">
      <span class="sansserif">Last Updated <b>September 28, 2000</b></span>
    </p>
  </body>
</html>
